package com.lucher.mes.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.lucher.mes.po.Bom;
import com.lucher.mes.po.Bom;

public interface BomMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Bom record);

    int insertSelective(Bom record);

    Bom selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Bom record);

    int updateByPrimaryKey(Bom record);
    
    //自定义接口
    List<Bom> findByList(Bom record);
    List<Bom> findByListForPage(Bom record);
    int findByCount(Bom record);
	/**
	 * Bom查询根据Bom编号
	 * 
	 * @param Bom
	 * @return
	 */
	public Bom findByProductcodeAndMaterialcode(@Param("productcode") String productcode, @Param("materialcode") String materialcode);
	
	/**
	 * 查询父亲根据Bom
	 * 
	 * @param Server
	 * @return
	 */
	public List<Bom> queryListByPid(Bom form);
	
	/**
	 * Bom批量删除
	 * 
	 * @param id
	 * @return
	 */
	public Integer deleteBatchByBomcode(Bom form);
}